<!doctype html>
<html>
<head>

<include file="public:head" />
<link rel="stylesheet" href="__STATIC__/itaoke_mizhe/css/new_index_min.css" type="text/css" media="all" />
<link rel=stylesheet type=text/css href="__STATIC__/itaoke_mizhe/css/common.css" />

<script type="text/javascript" src="__STATIC__/8mobcomjuanpi/js/index.js"></script>
</head>
<body>
<include file="public:header" />

<div class="container">
	<div id="content" class="span-24 wrapper">

<include file="public:nav-classify" />


<div class="wrap">
<div class="cate-wrap">
        <span class="big-tittle">今日特卖<span class="div-line">/</span></span>
        <!--介绍文字-->
	<span class="countdown">
		<span class="left-time">本场剩余：</span>
		<span data-time="<?php
			if(date("H")>10){
			
			echo  strtotime(date("Y-m-d 10:00:00",strtotime("+1 day")));
			}else{
			echo  strtotime(date("Y-m-d 10:00:00"));
			}
			
			?>" class="end-date-portal endtime" data-id="s1" id="end_date_s1"><em class="h">0</em>时<em class="m">0</em>分<em class="s">0</em>秒</span>
	</span>

	<div class="clearfix"></div>
	
	<div class="shop-wrap">
		<div id="nav-menu" class="nav-menu">
			<ul class="nav-box">
			<a href="{:C('itk_site_url')}" hidefocus="true"><li <empty name="cid"> class="selected"</empty>>全部</li></a>
			<volist name="cate_data" id="bcate">
			<if condition="$bcate['pid'] eq 0">
			<a href="{:U('index/cate', array('cid'=>$bcate['id']))}" title="{$bcate.name}" hidefocus="true"><li class="<if condition="($cid eq $bcate['id']) OR ($cate_data[$cid]['pid'] eq $bcate['id'])">selected</if>">{$bcate.name}</li></a>	
			</if>
			</volist>
			</ul>
			<div class="line-box">
			<empty name="cid">
				<div class="short-line" style="margin-left: 20px;"></div>
			<else />
				<volist name="cate_data" id="bcate" key="i">
				<if condition="($cid eq $bcate['id']) OR ($cate_data[$cid]['pid'] eq $bcate['id'])">
					<div class="short-line" style="margin-left: <?php echo $i*58+18; ?>px;"></div>
				</if>
				</volist>

			</empty>
			</div>
		</div>
		
	</div>
	<include file="public:list" />
</div>


</div>
	<div id="overlay" class="overlay" style="display: none;"></div>
</div>
</div>

<script type="text/javascript">
	function getTime(){
            $(".endtime").each(function () {
		var end = $(this).attr('data-time');
		var style = 2;
		var id = $(this).attr('data-id');
		today=new Date(); 
		timeold=((end)*1000-today.getTime()); 
		if (timeold < 0) {
			$("#end_date_"+id).html("已结束!");
			return;
		} 
		sectimeold=timeold/1000;
		secondsold=Math.floor(sectimeold); 
		msPerDay=24*60*60*1000;
		e_daysold=timeold/msPerDay;
		daysold=Math.floor(e_daysold); 
		e_hrsold=(e_daysold-daysold)*24;
		hrsold=Math.floor(e_hrsold); 
		e_minsold=(e_hrsold-hrsold)*60;
		minsold=Math.floor((e_hrsold-hrsold)*60); 
		e_seconds = (e_minsold-minsold)*60;
		seconds=Math.floor((e_minsold-minsold)*60); 
		ms = e_seconds-seconds;
		ms = new String(ms);
		ms1 = ms.substr(2,1);
		ms2 = ms.substr(2,1);
		hrsold1=daysold*24+hrsold;
		
		if(daysold>0){
			$("#end_date_"+id).html("<i>"+daysold+"</i>天<i>"+(hrsold<10?'0'+hrsold:hrsold)+"</i>时<i>"+(minsold<10?'0'+minsold:minsold)+"</i>分<i>"+(seconds<10?'0'+seconds:seconds)+"."+ms2+"</i>秒");
		}else{
			$("#end_date_"+id).html('<em class="h">'+(hrsold<10?'0'+hrsold:hrsold)+'</em>时<em class="m">'+(minsold<10?'0'+minsold:minsold)+'</em>分<em class="s">'+(seconds<10?'0'+seconds:seconds)+"."+ms2+"</em>秒");
		}
            });
        }
        setInterval("getTime()",100);
</script>

<include file="public:footer" />
</body>
</html>